<?php
	$db = mysql_connect("localhost","root");
	mysql_select_db('answer_sheet',$db);
	$query = 'select name from answer_table where link=' . "'" . $_POST['link'] . "'";
	$ans = mysql_fetch_array(mysql_query($query));
	if (strcasecmp($ans['name'],$_POST['answer']) == 0){
		mysql_query('UPDATE answer_table SET isAnswered = 1 WHERE link = ' . "'" . $_POST['link'] . "'");
		echo 'Correct!';
		}
	else
		echo 'Incorrect!';
	mysql_close($db);
?>